<template>

	<div id="logo">
		<div class="container">
			<form method="post" action="">
				<div class="login">
					<p class='title'>学生在线答题系统</p>
					<div class="input-login">
						<el-input placeholder="请输入用户名" v-model="username" clearable></el-input>
					</div>
					<div class="input-login">
						<el-input placeholder="请输入密码" v-model="password" show-password></el-input>
					</div>
					<div class="button">
						<router-link to="/manager">
					
						 <el-button type="primary">登陆</el-button>
						 
						</router-link>
						<router-link to="/Student">
						
						 <el-button type="success">注册</el-button>
						 
						</router-link>
					</div>	
				</div>
			</form>
		</div>
	</div>

</template>
<script>
export default{
	name:'Login',
	data(){
		return{
			username:'',
			password:'',
	
		}
	},
	created(){
            this.$axios({
                method:'post',
                url:'api',
                data:this.qs.stringify({    //这里是发送给后台的数据
                      userId:this.userId,
                      token:this.token,
                })
            }).then((response) =>{          //这里使用了ES6的语法
                console.log(response)       //请求成功返回的数据
            }).catch((error) =>
                console.log(error)       //请求失败返回的数据
			)
		}
}
</script>
<style lang='stylus' scoped>
#logo
    background: url("../../assets/img/background.jpg");
    background-size: 100% 100%;
    height: 100%;
    position: fixed;
    width: 100%
//背景图片
	.title
		font-size: 22px
		color: #fff
		font-weight: 500
		text-align:center
		
	.login
		width:25%
		height:400px;
		text-align: center;
		padding:50px
		margin:auto
		margin-top:200px
		background: rgba(255,255,255,0.2);
	//form表单
		.input-login
			height:50px
			width:80%
			margin:auto
		//输入框整体布局
		.input-login input
			display:block
			height:50px
			width:100%
			border-radius:5px
			border-color:grey
			margin-top:30px
		//输入框样式
		.button
			text-align:center
		//按钮整体布局
		.el-button
			width:80%
			height 40px
			text-align:center
			margin:30px auto 0 auto
		
		
		
</style>